home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d18
/
tchk20.arc
/
STRINGHK.H
< prev
next >
Wrap
C/C++ Source or Header
|
1989-01-13
|
2KB
|
41 lines
/* TCHK 2.0 - Howard Kapustein's Turbo C library 12-3-88 */
/* Copyright (C) 1988, Howard Kapustein. All rights reserved. */
/* stringhk.h - Howard Kapustein's string header file */
#ifndef STRINGHK_HEADER
#define STRINGHK_HEADER 1
#include <howard.h>
#ifndef STRING_DEFINES
#define endstri(s) (strlen(s)-1) /* end of string, integer */
#define endstrp(s) (s+endstri(s)) /* end of string, pointer */
#define STRING_DEFINES 1
#endif
/* function prototypes */
int intlen(char *number); /* find length of integer part of string */
char *strcomma(char *source); /* convert a string to xx,xxx,xxx format */
char *strtodol(char *source); /* convert string to $ format */
char *ltrim(char *source); /* trim blanks on left */
char *rtrim(char *source); /* trim blanks on right */
char *atrim(char *source); /* trim blanks on left & right */
char *strins(char *source, char *new, char *ptr); /* string insert */
char *strdel(char *source, char *old); /* string delete */
char *strrep(char c, int len); /* replicate c len times */
char *strfill(char *str, char c, int count); /* fill string str with c count times */
char *leftstr(char *source, int len); /* LEFT$(SOURCE$,len) */
char *rightstr(char *source, int len); /* RIGHT$(SOURCE$,len) */
char *midstr(char *source, int begin, int len); /* MID$(SOURCE$,begin,len) */
char *strshleft(char *source, int count); /* shift string left count chars */
char *strshright(char *source, int count); /* shift string right count chars */
char *strclean(char *str); /* remove non-printable ASCII codes */
char *strcapital(char *str); /* capitalize first letter of each word */
int stroccur(char *str, char *substr); /* # occurences of substring in string */
int strwcmp(char *wstr, char *str); /* compare wildcard w/string (*,?) */
int strwicmp(char *wstr, char *str); /* compare wildcard w/string (*,?), ignore case */
char *strtocomma(char *source); /* convert a string to xx,xxx,xxx format */
#endif /* STRINGHK_HEADER */